package com.lcq.gulimall.search.controller;

import com.lcq.common.to.SkuSearchInfoTo;
import com.lcq.common.utils.R;
import com.lcq.gulimall.search.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.util.List;

@RestController
@RequestMapping("/search/product")
public class ProductController {
    @Autowired
    ProductService productService;

    /**
     *商品上架
     * */
    @RequestMapping("/up")
    public R up(@RequestBody List<SkuSearchInfoTo> skuSearchInfoTo) throws IOException {
        productService.up(skuSearchInfoTo);
        return R.ok();
    }

}
